﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KHOALUAN
{
    public partial class frmLopHoc : Form
    {
        public frmLopHoc()
        {
            InitializeComponent();
            clsMain.cls.KhoiTaoXMLTable(clsMain.FormLopHoc, 5);
            clsMain.cls.clsForm.xmlD[clsMain.FormLopHoc].ColumnName[0] = "MÃ SỐ LỚP HỌC";
            clsMain.cls.clsForm.xmlD[clsMain.FormLopHoc].ColumnName[1] = "TÊN LỚP HỌC";
            clsMain.cls.clsForm.xmlD[clsMain.FormLopHoc].ColumnName[2] = "SỈ SỐ";
            clsMain.cls.clsForm.xmlD[clsMain.FormLopHoc].ColumnName[3] = "GIÁO VIÊN CHỦ NHIỆM";
            clsMain.cls.clsForm.xmlD[clsMain.FormLopHoc].ColumnName[4] = "KHOA";
            clsMain.cls.clsForm.xmlD[clsMain.FormLopHoc].Names[0] = "MSLH";
            clsMain.cls.clsForm.xmlD[clsMain.FormLopHoc].Names[1] = "TENLH";
            clsMain.cls.clsForm.xmlD[clsMain.FormLopHoc].Names[2] = "SISO";
            clsMain.cls.clsForm.xmlD[clsMain.FormLopHoc].Names[3] = "GVCN";
            clsMain.cls.clsForm.xmlD[clsMain.FormLopHoc].Names[4] = "KHOA";
        }

        private void frmLopHoc_Load(object sender, EventArgs e)
        {
            
            
            clsMain.cls.KhoiTaoFormControls(clsMain.FormLopHoc);
            clsMain.cls.KhoiTaoFormControls(clsMain.FormLopHoc, dgv);
            clsMain.cls.KhoiTaoFormControls(clsMain.FormLopHoc, but);
        }

        private void dgv_MouseDoubleClick(object sender, EventArgs e)
        {
            clsMain.cls.AddDataToControls(clsMain.FormLopHoc);
        }

        private void but_Click(object sender, EventArgs e)
        {
            clsMain.cls.ButtonsClick(clsMain.FormLopHoc, but.ClickState);
        }

        private void txtGVCNhiem_DoubleClick(object sender, EventArgs e)
        {
            
            clsMain.cls.CallFormGridView(clsMain.FormGridView, clsMain.FormLopHoc, clsMain.FormGiaoVien,txtGVCNhiem.Tag.ToString());
        }

        private void txtKhoa_DoubleClick(object sender, EventArgs e)
        {
            clsMain.cls.CallFormGridView(clsMain.FormGridView, clsMain.FormLopHoc, clsMain.FormKhoa,txtKhoa.Tag.ToString());
        }

        
    }
}
